#反转字符串
str='123456'
# print(str[::-1])

def backStr(str):
    str_back=''
    for i in range(0,len(str)//2):
        str_back=str[::-1]
    return str_back
def backStr1(str):
    strList=list(str)
    for i in range(len(strList)//2):
        strList[i],strList[len(strList)-1-i]=strList[len(strList)-i-1],strList[i]
    return ''.join(strList)
def backStr2(str):
    return ''.join(reversed(str))
print(backStr2('123456'))